﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Data;
using System.IO;
using Aspose.Words;
using Aspose;
using Aspose.Words.Drawing;
using Aspose.Words.Reporting;
using Aspose.Words.Viewer;

namespace GPCSC.Web.CM
{
    public partial class nchdxs :  PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string types = Usual.f_querystringToString("type");
                if (types == "1")
                {
                    this.jncs.Style.Add("display","");
                }
                else if (types == "2")
                {
                    this.jsqs.Style.Add("display","");
                }
                else if (types == "3")
                {
                    this.jqys.Style.Add("display","");
                }

                string sdf = Usual.f_querystringToString("ids");

                f_bund(types, sdf);
            }
        }
        protected void f_bund( string types, string sdf)
        { 
                Hashtable htable = new Hashtable();
                htable.Add("@id",sdf);
                if (types == "1")
                {
                    DataSet ds = new SqlReadXml().ReaderDataSet("sel_NongCun_bykid", htable);
                    if (ds != null)
                    {
                        if (ds.Tables.Count > 0)
                        {
                            UIFactory.UIFactory_Set(this, ds.Tables[0]);
                        }
                    }
                }
                else if (types == "2")
                {
                    DataSet ds = new SqlReadXml().ReaderDataSet("sel_sq_bykid", htable);
                    if (ds != null)
                    {
                        if (ds.Tables.Count > 0)
                        {
                            UIFactory.UIFactory_Set(this, ds.Tables[0]);
                        }
                    }
                }
                else if (types == "3")
                {
                    DataSet ds = new SqlReadXml().ReaderDataSet("sel_qy_bykid", htable);
                    if (ds != null)
                    {
                        if (ds.Tables.Count > 0)
                        {
                            UIFactory.UIFactory_Set(this, ds.Tables[0]);
                        }
                    }
                }
        }
    }
}